$(function() {
				var $form_div = $("#scostSearchFrom div");
				winResize($form_div);
				$(window).resize(function(){//当调整浏览器窗口的大小时，发生 resize 事件
					winResize($form_div);
				});
				
				loadTable();
				
})
function initTableTitle(){
	var name = $("#organ").val();
	return name;
}

var $form = $('#scostSearchFrom');
function  loadTable()
{
	var columns=[[
	              {field:'organ',title:'所属机构',width:100,align:'center'},
	              {field:'datetime',title:'日期',width:150,align:'center',sortable:true},
	              {field:'type',title:'支出类别',width:100,align:'center',sortable:true},
	              {field:'money',title:'支出金额（元）',width:100,align:'center',sortable:true},
	              {field:'zffs',title:'支付方式',width:100,align:'center',sortable:true},
	              {field:'zcuser',title:'支出人员',width:100,align:'center',sortable:true},
	              {field:'czuser',title:'操作人员',width:100,align:'center'},
	              {field:'zcmx',title:'明细',width:300,align:'center'}
	              ]];
	var name = initTableTitle();
	$('#scost_datagrid').datagrid({
		cls: "theme-datagrid",
		  title:name,
		  singleSelect:true,  
		  rownumbers: true,
		  fitColumns:true,
		  toolbar: '#tb',
		  columns:columns,
		  url: "scost/getCostInfo",
		  queryParams: sy.serializeObject($form),
		  pagination: true,
		  pageSize: 10,
		  remoteSort:false,
		  multiSort:true
	});

}

function searchFrom(){
	loadTable();
}